/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.ipinyou.wordstatistics.util;

import java.io.File;
import java.io.FileFilter;

/**
 *
 * @author xiangnan.wang@ipinyou.com
 */
public class ExtensionFileFilter implements FileFilter {

    private String extension;
    
    public ExtensionFileFilter(String extension){
        this.extension="."+extension;
    }
    
    public boolean accept(File pathname) {
        return pathname.isDirectory() || pathname.getName().contains(extension);
    }
    
}
